package com.dragon.repository.domain.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dragon.repository.entity.ArrangePersonnel;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.dragon.common.util.BeanUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Date;


/**
 * @author sy
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ArrangePersonnelDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考勤人员表id")
    private Integer id;

    @ApiModelProperty(value = "用户id")
    private Integer adminId;

    @ApiModelProperty(value = "用户名称")
    private String adminName;

    @ApiModelProperty(value = "主配置id")
    private Integer arrangeId;


    public ArrangePersonnelDTO() {}

    public ArrangePersonnelDTO(ArrangePersonnel entity) {
        BeanUtils.copyProperties(entity,this);
    }

    public static ArrangePersonnelDTO convert(ArrangePersonnel entity) {
        return new ArrangePersonnelDTO(entity);
    }

    public static List<ArrangePersonnelDTO> convertList(List<ArrangePersonnel> list) {
        List<ArrangePersonnelDTO> resultList = new ArrayList<>();
        for (ArrangePersonnel entity : list) {
            resultList.add(new ArrangePersonnelDTO(entity));
        }
        return resultList;
    }}
